import service from "@/request/serve";

/**
 * methods: 请求
 * @param url 请求地址
 * @param params 请求参数
 */
function get(url, params) {
  const config = {
    method: "get",
    url: url,
  };
  if (params) config.params = params;
  return service(config);
}
function post(url, params) {
  const config = {
    method: "post",
    url: url,
  };
  if (params) config.data = params;
  return service(config);
}
//导出
export { get, post };
